//
//  WeiXinTimeLineViewController.m
//  WeixinActivity
//
//  Created by Apple on 15/12/10.
//  Copyright © 2015年 Johnny iDay. All rights reserved.
//

#import "WeiXinTimeLineViewController.h"
#import "WeiXinRootViewController.h"
#define WIDTH  [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height
@interface WeiXinTimeLineViewController ()

@end

@implementation WeiXinTimeLineViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self configUI];
    // Do any additional setup after loading the view.
}
- (void)configUI
{
    UIImageView *view = [[UIImageView alloc] initWithFrame:self.view.bounds];
    view.image = self.backImage;
    [self.view addSubview:view];
    
    UIView *zheView = [[UIView alloc] initWithFrame:self.view.bounds];
    zheView.backgroundColor = [UIColor blackColor];
    zheView.alpha = 0.5;
    [self.view addSubview:zheView];
    
    
    //这里嵌入一个子视图控制器，用来编辑内容
    WeiXinRootViewController *weixin = [WeiXinRootViewController new];
    weixin.goBack = ^()
    {
        [self dismissViewControllerAnimated:YES completion:nil];
    };
    UINavigationController *navi = [[UINavigationController alloc] initWithRootViewController:weixin];
    [self addChildViewController:navi];
    navi.view.frame = CGRectMake(0.5 * (WIDTH * 0.2), 0.5 * (HEIGHT * 0.4), WIDTH * 0.8, HEIGHT * 0.6);
    [self.view addSubview:navi.view];
    
}
@end
